package com.zhitan.ems.app.stat.config.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zhitan.ems.app.stat.config.entity.ElectricityTypeSettingItemEntity;
import com.zhitan.ems.app.stat.config.mapper.ElectricityTypeSettingItemMapper;
import com.zhitan.ems.app.stat.config.service.ElectricityTypeSettingItemService;
import com.zhitan.ems.framework.core.mp.base.BaseServiceImpl;
import com.zhitan.ems.framework.core.vo.VQueryKit;

@Service
public class ElectricityTypeSettingItemServiceImpl extends BaseServiceImpl<ElectricityTypeSettingItemMapper, ElectricityTypeSettingItemEntity> implements ElectricityTypeSettingItemService {

	
	    @Override
	    public List<ElectricityTypeSettingItemEntity> getBySettingId(Long settingId) {
	        // 使用自定义SQL查询绕过租户拦截器
	    	QueryWrapper<ElectricityTypeSettingItemEntity> queryWrapper = new QueryWrapper<>();
			queryWrapper.eq(VQueryKit.getUnderColumn("settingId"), settingId);
			List<ElectricityTypeSettingItemEntity> list=this.list(queryWrapper);
//	        return baseMapper.selectBySettingId(settingId);
			return list;
	    }
}